/*
 * @Description: 优惠券列表
 * @Date: 2022-12-30 21:47:53
 * @Author: lizhiqiang
 */
import { post, get } from "@/utils/request"
// 优惠券列表
export const GL = (params: any) => {
	return post("/cdwl-coupon/couponInfoOp/getlist", params)
}

// 优惠券批次发放 - 列表
export const getCouponBantCreateList = (params: any) => {
	return post("/cdwl-coupon/coupon/distributeList", params)
}

// 优惠券批次发放 - 导入excel
export const uploadCouponBatch = (params: any, sn: string) => {
	return post(`/cdwl-coupon/coupon/distribute?sn=${sn}`, params, {'Content-Type':'multipart/form-data'})
}

// 优惠券批次发放 - 详情
export const getCouponBatchDetail = (params: any) => {
	return post('/cdwl-coupon/coupon/distributeDetail', params)
}

// 优惠券管理 - 冻结
export const adminFrozeCoupon = (params: any) => {
	return post('/cdwl-coupon/couponInfoOp/adminFroze', params)
}

// 优惠券管理 - 解冻
export const adminUnFrozeCoupon = (params: any) => {
	return post('/cdwl-coupon/couponInfoOp/adminUnFroze', params)
}

// 优惠券管理 - 作废
export const discardCoupon = (params: any) => {
	return post('/cdwl-coupon/couponInfoOp/adminDiscard', params)
}

// 优惠券 - 详情
export const getCouponDetail =(params: any)=>{
	return get(`/cdwl-coupon/couponInfoOp/detail`, params)
}